home *** CD-ROM | disk | FTP | other *** search
/ Trading on the Edge / Trading On The Edge - CD-ROM Toolkit (Wayzata Technology)(2031)(1994).bin / pc / mac_file / vendor_d / neuralwa / nw2v50 / radbasis.nnc < prev    next >
Text File  |  1993-08-23  |  3KB  |  82 lines

  1. csv3.8    ! Control Strategy Version 3.8
  2. LisaRisa   trace    aux3
  3. L_saR_sa   cset     recall,0
  4. !
  5. ! >>>>> Recall Mode <<<<<
  6. L_saR_sa   lset     in,0
  7. L___R_sa   io       read
  8. L___R_sa   cset     layer,-1
  9. @LAB_000
  10. L___R_sa   lset     cur,1
  11. L___R_sa   math     sum
  12. L___R_sa   math     rnoise|tran|output
  13. L___R_sa   lcmp     out,-1
  14. L___R_sa   blt      @LAB_000
  15. L___R_sa   lset     out,0
  16. L___R_sa   io        rcltst
  17. L___R_sa   math     sum|ce=e|tran|output|e-=w|swap
  18. L___R_sa   io       write
  19. !
  20. ! >>>>> Learn Mode <<<<<
  21.  
  22. ! Input layer
  23. L_saR___   lset     in,0
  24. L_saR___   io       lrnin
  25. L_saR___   math     sum|fire|lnoise|tran|output
  26.  
  27. ! Transform over preprocessing layers
  28.  
  29. @LAB_001
  30. L_saR___   lset     cur,1
  31. L_saR___   fcmp     learnf,ll:none
  32. L_saR___   bne      @LAB_002
  33. L_saR___   math     sum|fire
  34. L_saR___   math     fire|tran|output
  35. L_saR___   brct     @LAB_001
  36.  
  37. @LAB_002
  38. ! Assume that first learning layer is radial basis layer
  39. ! Now check if we have reached end of learn schedule
  40. L_saR___   math     e=0     ! Artifact for Designer Pack to call nn_setlrs
  41. L_saR___   ccmp     wrk1,0
  42. L_saR___   bgt      @LAB_006
  43. L_saR___   fcmp     lflag,eols
  44. L_saR___   banz     @LAB_007    !End of k-means, do p-nn if Moody/Darken
  45. L_saR___   math     sum|fire|tran|output|learn !do k-means
  46. L_saR___   br       @LAB_005
  47. ! End of schedule for k-means. Moody/Darken error function is
  48. ! PNN which will find the basis function widths.
  49. @LAB_007
  50. L_saR___   math     e-=w|fire
  51. L_saR___   cset     wrk1,1      !Flag that p-NN has been done
  52. !
  53. @LAB_006
  54. L_saR___   math     sum|fire|tran|output|e=0
  55. L_saR___   cset     wrk2,0
  56. ! We might have a sequence of layers above the radial basis
  57. ! layer. First feed-forward to the output layer
  58. @LAB_003
  59. L_saR___   lset     cur,1
  60. L_saR___   cadd     wrk2,1      !Count number hidden/output layers
  61. L_saR___   math     sum|fire
  62. L_saR___   math     lnoise|tran|output|e=0|fire
  63. L_saR___   lcmp     out
  64. L_saR___   blt      @LAB_003
  65.  
  66. ! Now we are at the output layer.  Read in the desired output and
  67. ! do back-prop learning down to the radial basis layer
  68. L_saR___   io       lrnrslt         ! result of feed-forward
  69. L_saR___   io       lrnout          ! desired output
  70. L_saR___   math     e-=w|e*=ef|fire !calculate error,scale with errfac
  71.  
  72. @LAB_004
  73. L_saR___   math     ce=e|e*=f'|backp|fire
  74. L_saR___   math     learn|fire      ! delayed learning for recurrence
  75. L_saR___   lset     cur,-1          ! previous layer
  76. L_saR___   csub     wrk2,1          ! Don't go below hidden
  77. L_saR___   ccmp     wrk2,0
  78. L_saR___   bgt      @LAB_004
  79.  
  80. @LAB_005
  81. LisaRisa   trace    0
  82.